﻿using IRepositories;
using iService;
using Repositories;
using Service.BASE;
using swiftCode.Bbs.Model.Model;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Text;
using System.Threading.Tasks;

namespace Service
{
    public class ArticleService : BaseServices<Article>, IArticleService
    {
        public IArticleRepositories dal = new ArticleRepositories();
        //public void Add(Article model)
        //{
        //    dal.InsertAsync(model);
        //}

        //public void Delete(Article model)
        //{
        //    dal.DeleteAsync(model);
        //}

        //public List<Article> Query(Expression<Func<Article, bool>> expression)
        //{
        //    return null;
        //}

        //public void Update(Article model)
        //{
        //    dal.UpdateAsync(model);
        //}

        public Task<Article> FindSingle(Expression<Func<Article, bool>> expression)
        {
            return dal.GetAsync(expression);
        }

        public Task<List<Article>> GetListAsync(Expression<Func<Article, bool>> value)
        {
            return dal.GetListAsync(value);
        }
    }
}
